/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 仪表盘容器 */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* 导航栏样式 */
nav {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
    text-decoration: none;
    color: #2c3e50;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 4px;
}

.nav-link:hover {
    background-color: #f0f0f0;
}

.nav-link.active {
    background-color: #3498db;
    color: white;
}

/* 天气概览样式 */
.weather-overview {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.current-weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.weather-icon {
    text-align: center;
}

.weather-icon img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.weather-details p {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

/* 图表容器样式 */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-btn {
    background-color: #3498db;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.login-btn:hover {
    background-color: #2980b9;
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    background-color: #fde8e6;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 首页样式 */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h1 {
    color: #2c3e50;
    font-size: 32px;
    margin-bottom: 15px;
}

.welcome-section p {
    color: #7f8c8d;
    font-size: 18px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.feature-card p {
    color: #7f8c8d;
}

/* 生活指数样式 */
.life-indices-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.life-indices-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.index-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.index-card:hover {
    transform: translateY(-5px);
}

.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.index-header h3 {
    color: #333;
    margin: 0;
    font-size: 18px;
}

.index-level {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    background: #4A90E2;
    color: white;
}

.index-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}